package com.chencq.core.task.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import com.chencq.core.task.TaskDemoServiceI;

@Configuration
@EnableScheduling
public class TaskDemoServiceImpl implements TaskDemoServiceI {

	protected Logger logger = LoggerFactory.getLogger(TaskDemoServiceImpl.class);

	// 每一分钟执行一次 0 0/1 * * * ?
	// 每天10点开始执行一次
	@Scheduled(cron = "0 0 10 * * ?")
	@Override
	public void test() {
		logger.info("定时任务执行...");
	}

}
